$(document).ready(function(){

	$.ajax({
		type: "POST",
		url: '/web/bi/business/getBusinessFunds',
		async: true,
		success: function (data) {
			if (data.code == 0) {
				var title = data.title;
				$('#companyAccountDje').text(data.companyAccountDje);
				$('#directAccountDje').text(data.directAccountDje);
				$('#transitionAccountDje').text(data.transitionAccountDje);
				$('#operatingAccountDje').text(data.operatingAccountDje);
				$('#deactivateAccountDje').text(data.deactivateAccountDje);
				$('#otherAccountsDje').text(data.otherAccountsDje);
				$('#updateTime1').text(data.updateTime1);
				//列表1
				//表头
				var tableHead1 = '<th width="120">运营公司编码</th> <th width="120">运营公司简称</th> <th width="120">账户属性</th> <th width="120">昨日资金变化</th>';
				for (var i = 0; i < title.length; i++) {
					tableHead1 += '<th width="120">' + title[i] + '</th>';
				}
				tableHead1 += '<th width="120">备注</th>';
				$('#tableHead1').html(tableHead1);
				//表数据
				var tableBody1 = '';
				var tableListByIn = data.dataList;
				for (var i = 0; i < tableListByIn.length; i++) {
					var row = tableListByIn[i];
					tableBody1 += '<tr>';
					tableBody1 += '<td style="text-align:center;">' + row.vgsBm + '</td>';
					tableBody1 += '<td style="text-align:center;">' + row.vgsJc + '</td>';
					tableBody1 += '<td style="text-align:center;">' + row.vzhlx + '</td>';
					tableBody1 += '<td style="text-align:center;">' + row.changes + '</td>';
					tableBody1 += '<td style="text-align:center;">' + row.history1 + '</td>';
					tableBody1 += '<td style="text-align:center;">' + row.history2 + '</td>';
					tableBody1 += '<td style="text-align:center;">' + row.history3 + '</td>';
					tableBody1 += '<td style="text-align:center;">' + row.history4 + '</td>';
					tableBody1 += '<td style="text-align:center;">' + row.history5 + '</td>';
					tableBody1 += '<td style="text-align:center;">' + row.history6 + '</td>';
					tableBody1 += '<td style="text-align:center;">' + row.history7 + '</td>';
					tableBody1 += '<td style="text-align:center;">' + row.remark + '</td>';
					tableBody1 += '</tr>';
				}
				$('#tableBody1').html(tableBody1);

			} else {
				alert(data.msg);
			}
		}, error: function() {
			alert("操作失败，请稍后再试！", { icon: 2 });
		}
	});
});

